A two-dimensional code as illustrated in FIG. 13 representing various kinds of information by code symbols is conventionally known. The two-dimensional code represents a binary bit string by an array of white modules and black modules different from each other in light reflectance, and the bit string represents information, for example, in a form illustrated in FIG. 15.
A bit string (encoded data) 500 illustrated in FIG. 14 contains output data 510, a terminator pattern 520, padding data 530, and error correcting data 540.
The output data 510 is valid information to be output as a reading result of the two-dimensional code and includes a plurality of segments. Each of the segments is defined in a standard for the two-dimensional code and contains a specifier specifying a mode of the segment (the kind and format of data to be described in the segment) and a data body of the segment.
FIG. 15 illustrates examples of the kinds of the mode to be used in the two-dimensional code. As illustrated in FIG. 15, the modes include ones having data of a fixed length and ones having data of a variable length, and data indicating the data length is also contained in the segment in the mode of the variable length as illustrated in FIG. 16. The segment without data is composed only of a specifier.
The terminator pattern 520 is a bit string indicating the end of the valid information, and the data after the terminator pattern 520 is not output as the reading result of the two-dimensional code.
The padding data 530 is a pattern defined in the standard for the two-dimensional code as invalid data for filling an extra space. In the example in FIG. 14, the padding data 530 is a pattern provided with a repeated part of “11101100” and “00010001” after a 0-addition part. The bit string for being converted into the two-dimensional code needs to have a specific length determined in the standard, and therefore when the output data 510 is shorter, the extra space needs to be filled.
The error correcting data 540 is data used for error correction in reading the two-dimensional code, such as a Reed-Solomon code.
In the bit string 500, the valid information can be arranged in the whole region other than the error correcting data 540, but the amount of the output data 510 is smaller than the size of the region in the example of FIG. 14, and therefore the terminator pattern 520 is arranged and then the residual is filled with the padding data 530.
Further, PTL1 discloses a two-dimensional code recording key data used for decrypting encrypted data coded in a code specification of the two-dimensional code, in an overlapping manner in a configuration in which the key data is written over at least one of the encrypted data and error correcting data.
PTL2 discloses a technique in which a two-dimensional code made by encoding a predetermined information and detection information for detecting fraudulence regarding the predetermined information is used and, in reading the two-dimensional code, a reading apparatus transmits the detection information obtained by decoding the two-dimensional code to a fraudulence detection apparatus, and the fraudulence detection apparatus collates the detection information with information registered in advance to thereby detect whether or not there is fraudulence in the information coded in the two-dimensional code, and reports the result to the reading apparatus.